<?php

namespace Catalog;

use Doctrine\ORM\Mapping as ORM;

/**
 * Catalog\CommentRating
 *
 * @ORM\Table(name="comment_rating")
 * @ORM\Entity
 */
class CommentRating
{
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var integer $value
     *
     * @ORM\Column(name="value", type="integer", nullable=false)
     */
    private $value;

    /**
     * @var integer $ip
     *
     * @ORM\Column(name="ip", type="integer", nullable=false)
     */
    private $ip;

    /**
     * @var Catalog\Comments
     *
     * @ORM\ManyToOne(targetEntity="Catalog\Comments")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="comment_id", referencedColumnName="id")
     * })
     */
    private $comment;



    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set value
     *
     * @param integer $value
     * @return CommentRating
     */
    public function setValue($value)
    {
        $this->value = $value;
        return $this;
    }

    /**
     * Get value
     *
     * @return integer 
     */
    public function getValue()
    {
        return $this->value;
    }

    /**
     * Set ip
     *
     * @param integer $ip
     * @return CommentRating
     */
    public function setIp($ip)
    {
        $this->ip = $ip;
        return $this;
    }

    /**
     * Get ip
     *
     * @return integer 
     */
    public function getIp()
    {
        return $this->ip;
    }

    /**
     * Set comment
     *
     * @param Catalog\Comments $comment
     * @return CommentRating
     */
    public function setComment(\Catalog\Comments $comment = null)
    {
        $this->comment = $comment;
        return $this;
    }

    /**
     * Get comment
     *
     * @return Catalog\Comments 
     */
    public function getComment()
    {
        return $this->comment;
    }
}